package org.jsola.hr.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jsola.core.query.BaseQuery;
import org.jsola.hr.vo.excel.FieldItemVO;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author lyh
 */

@EqualsAndHashCode(callSuper = true)
@Data
public class EmpSocTransformQuery extends BaseQuery {

    private static final long serialVersionUID = 1L;

    @ApiParam(value = "员工Id")
    private String empId;

    @ApiParam(value = "计划增减员时间")
    private Date planIncreaseOrDecreaseDate;

    @ApiParam(value = "姓名或身份证")
    private String nameOrIdCard;

    @ApiParam(value = "公司Id")
    private String companyId;

    @ApiParam(value = "参保时间")
    @DateTimeFormat(pattern = "yyyy-MM")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date empSocDate;

    @ApiParam(value = "员工社保状态")
    private String empSocStatusString;

    @ApiParam(value = "员工社保状态列表")
    private List<Integer> empSocStatusList;

    @ApiParam(value = "人员类型")
    private Integer postType;

    @ApiParam(value = "参保方案Id")
    private String socProgId;

    @ApiParam(value = "参保城市")
    private String socCityId;

    @ApiParam(value = "参保月份Id")
    private String monthId;

    @ApiParam(value = "员工Id列表")
    private List<String> empIdList;

    @ApiParam(value = "参保管理Id列表")
    private List<String> empSocInfoIdList;

    @ApiParam(value = "公积金封存时间")
    @DateTimeFormat(pattern = "yyyy-MM")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date sealedDate;

    @ApiParam(value = "计划社保停保时间")
    @DateTimeFormat(pattern = "yyyy-MM")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date planStopSocDate;

    @ApiParam(value = "社保停保时间")
    @DateTimeFormat(pattern = "yyyy-MM")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date stopSocDate;

    @ApiParam(value = "减员确认时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date decreaseConfirmDate;

    @ApiParam(value = "增员确认时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date increaseConfirmDate;

    @ApiParam(value = "参保方案是否只设置参保金额")
    private Boolean onlySocAmount;

    @ApiParam(value = "支付归属")
    private Integer payAttribution;

    @ApiParam(value = "新缴纳基数")
    private BigDecimal newCardinality;

    @ApiParam(value = "社保名单导出,表头信息")
    List<FieldItemVO> headInfo;

    @ApiParam(value = "员工状态")
    private Integer status;

    @ApiParam(value = "社保状态")
    private Integer empSocStatus;

    @ApiParam(value = "医保状态")
    private Integer empMeStatus;

    @ApiParam(value = "公积金状态")
    private Integer empPfStatus;

    @ApiParam(value = "社保账号")
    private String socAccount;

    @ApiParam(value = "医保账号")
    private String meAccount;

    @ApiParam(value = "公积金账号")
    private String pfAccount;

    @ApiParam(value = "签约主体")
    private String contractSubject;

    /**
     * 每页的条数
     */
    @ApiParam(value = "分页参数，每页的条数", example = "20")
    @Max(value = 1000, message = "pageSize不能大于1000")
    private Integer pageSize = 20;

    /**
     * 当前第几页
     */
    @ApiParam(value = "分页参数，第几页", example = "1")
    @Min(value = 1, message = "pageNo不能小于1")
    private Integer pageNo = 1;
}
